<?php

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport( 'joomla.application.component.view');

/**
 * HTML View class for the autoresponder View
 *
 * @package Joomla
 * @subpackage autoresponder
 * @since 1.0
 */
class TaxiBookingViewTaxiBooking extends JView
{
	/**
	 * Creates the Entrypage
	 *
	 * @since 1.0
	 */
	function display( $tpl = null )
	{
		global $mainframe;
		
		//Load pane behavior
		jimport('joomla.html.pane');

		//initialise variables
		$document	= & JFactory::getDocument();
				
		//build toolbar
		JToolBarHelper::title( JText::_( 'Taxi Booking' ), 'generic' );

		//add css and submenu to document
		$document->addStyleSheet('components/com_taxibooking/assets/css/bookingbackend.css');

		//JToolBarHelper::preferences('com_taxibooking', '550', '570', JText::_('CONFIGURATION'));
		
		//Create Submenu
		JSubMenuHelper::addEntry( JText::_( 'HOME' ), 'index.php?option=com_taxibooking', true);
		JSubMenuHelper::addEntry( JText::_( 'ORDERS' ), 'index.php?option=com_taxibooking&view=orders');
                JSubMenuHelper::addEntry( JText::_( 'INTEREST_POINTS' ), 'index.php?option=com_taxibooking&view=points');
                JSubMenuHelper::addEntry(JText::_( 'ROUTES' ), 'index.php?option=com_taxibooking&view=routes');
                JSubMenuHelper::addEntry( JText::_( 'COUNTYS' ), 'index.php?option=com_taxibooking&view=countys');
                JSubMenuHelper::addEntry( JText::_( 'DISTRICTS' ), 'index.php?option=com_taxibooking&view=districts');
                JSubMenuHelper::addEntry( JText::_( 'SETTINGS' ), 'index.php?option=com_taxibooking&view=settings');
				
		parent::display($tpl);

	}
	
	/**
	 * Creates the buttons view
	 *
	 * @param string $link targeturl
	 * @param string $image path to image
	 * @param string $text image description
	 * @param boolean $modal 1 for loading in modal
	 */
	function quickiconButton( $link, $image, $text, $modal = 0 )
	{
		//initialise variables
		$lang 		= & JFactory::getLanguage();
  		?>

		<div style="float:<?php echo ($lang->isRTL()) ? 'right' : 'left'; ?>;">
			<div class="icon">
				<?php
				if ($modal == 1) {
					JHTML::_('behavior.modal');
				?>
					<a href="<?php echo $link.'&amp;tmpl=component'; ?>" style="cursor:pointer" class="modal" rel="{handler: 'iframe', size: {x: 650, y: 400}}">
				<?php
				} else {
				?>
					<a href="<?php echo $link; ?>">
				<?php
				}

					echo JHTML::_('image', 'administrator/components/com_taxibooking/assets/images/'.$image, $text );
				?>
					<span><?php echo $text; ?></span>
				</a>
			</div>
		</div>
		<?php
	}
}
?>